package model

import "time"

type CozeChat struct {
	Id             int       `json:"id" gorm:"type:int(11) auto_increment; NOT NULL; primary_key"`
	UserId         int       `json:"user_id" gorm:"type:int(11); COMMENT:'用户id'"`
	ConversationId string    `json:"conversation_id" gorm:"type:varchar(255); COMMENT:'会话id'"`
	BotId          string    `json:"bot_id" gorm:"type:varchar(255); COMMENT:'机器人id'"`
	Content        string    `json:"content" gorm:"type:text; COMMENT:'消息'"`
	ContentType    string    `json:"content_type" gorm:"type:varchar(255); COMMENT:'消息类型'"`
	Type           string    `json:"type" gorm:"type:varchar(255); COMMENT:'提问/回答'"`
	Status         int       `json:"status" gorm:"type:tinyint(1); COMMENT:'状态'"`
	CreatedAt      time.Time `json:"created_at" gorm:"type:datetime"`
	UpdatedAt      time.Time `json:"updated_at" gorm:"type:datetime"`
}

const (
	CozeChatStatusEnd    = 0
	CozeChatStatusActive = 1
)

func (c *CozeChat) TableName() string {
	return "coze_chat"
}
